
// VirtualReaderProxyDlg.h : header file
//

#pragma once
#include "colorlistctrl.h"

typedef void (*funfrmprintf)(char*);
void frmprintf(char* buf);
typedef void (WINAPI *SetFunFrmPrintf)(funfrmprintf f);
// CVirtualReaderProxyDlg dialog
class CVirtualReaderProxyDlg : public CDialogEx
{
// Construction
public:
	CVirtualReaderProxyDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_VIRTUALREADERPROXY_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

protected:
	CFont	m_FontView;
	CRichEditCtrl m_RichEditCtrl;
	CColorListCtrl m_ListProcess;
	SetFunFrmPrintf m_dllSetFunFrmPrintf;
	int InjectDll(DWORD processID);
public:
	void AppendText(const CString& str, const COLORREF cr=RGB(0,0,0));
	void ListAllProcess();

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnSysCommand(UINT nID, LPARAM lParam);
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
	afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
	afx_msg void OnBnClickedBtnInject();
	void OnListProcessDBLClick(NMHDR* pNMHDR, LRESULT* pResult);
	
	afx_msg void OnBnClickedBtnRefreshProcess();
};
